﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;

namespace Mindfor.Web.Data.Mappings
{
	public class WidgetMap : ClassMap<Widget>
	{
		public WidgetMap()
		{
			Table("Widgets");
			Id(m => m.Id);
			Map(m => m.ModuleName).Length(255).Not.Nullable();
			Map(m => m.WidgetName).Length(255).Not.Nullable();
			Map(m => m.WidgetParam).Nullable();
			Map(m => m.Place).Length(255).Not.Nullable();
			Map(m => m.Sort);
			References(m => m.Page, "PAgeId");
		}
	}
}
